fix: prevent silent flag failures and separate auth exit code#7
Merged
Conversation
Add conflicts_with_all to --period and --offset flags in post list command to prevent silent failures when used with incompatible modes (--recent, --username, --drafts). Change AuthError exit code from 2 to 1 to distinguish runtime auth errors from clap usage errors per POSIX conventions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update doc comments that still referenced exit code 2 for AuthError to reflect the corrected exit code 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--period와--offset플래그에conflicts_with_all을 추가하여,--recent/--username/--drafts모드에서 사용 시 에러 없이 무시되던 조용한 실패를 방지AuthErrorexit code를 2→1로 변경하여 인증 에러(런타임)와 clap 사용법 에러를 구분 가능하게 함 (POSIX 관례 준수)Test plan
cargo test— 150 tests passed (120 unit + 30 integration)cargo clippy -- -D warnings— 0 warningsvelog post list --recent --period day→ exit 2, 에러 메시지 (기존: 조용한 실패)velog post list --username test --period day→ exit 2, 에러 메시지velog post list --recent --offset 10→ exit 2, 에러 메시지velog post list --trending --period day→ 정상 동작 유지velog post list --period day(단독) → requires 에러 유지Context
CLI UX E2E 테스트(
.ux-test-results/report.md)에서 발견된 2개 Critical + 1개 Fail 이슈 수정:--period가--recent/--username과 함께 사용 시 에러 없이 무시됨--offset이 trending 외 모드에서 에러 없이 무시됨🤖 Generated with Claude Code